package routers

import (
	"github.com/gin-gonic/gin"
	"muziai-server/api"
	"muziai-server/middleware"
)

func AiRoleRouter(r *gin.RouterGroup) {
	middleware := middleware.MiddlewareAuth{}
	app := api.ApiApp.AiRoleApi
	r.POST("ai_role", middleware.MiddlewareAuth(), app.RoleCreateView)
	r.GET("ai_role", middleware.MiddlewareAuth(), app.AiRoleListView)
	r.PUT("ai_role", middleware.MiddlewareAuth(), app.AiRoleUpdateUserView)
	r.PUT("ai_role/admin", middleware.MiddlewareAdmin, app.AiRoleUpdateAdminView)
	r.POST("ai_role/work_order", middleware.MiddlewareAuth(), app.AiRoleWorkCreateView)
	r.GET("ai_role/work_order", middleware.MiddlewareAuth(), app.AiRoleWorkOrderListView)
	r.PUT("ai_role/work_order", middleware.MiddlewareAdmin, app.AiRoleWorkOrderApproveView)
	r.DELETE("ai_role/work_order", middleware.MiddlewareAdmin, app.AiRoleWorkRemoveView)
	r.DELETE("ai_role/:id", middleware.MiddlewareAuth(), app.AiRoleRemoveView)
	r.GET("ai_role/options/id_title", middleware.MiddlewareAdmin, app.AiRoleIDTitleOptionsView)
	r.GET("ai_role/options/avatar_or_category", app.AiRoleAvatarOrCategoryOptionsView)
	r.GET("ai_role/recent_session", middleware.MiddlewareAuth(), app.AiRoleRecentSession)
}
